const http = require("http")
const datas = require("../static/mock/datas.json")

const server = http.createServer((req, res) => {
	res.setHeader('Access-Control-Allow-Origin', '*');
	res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild');
	res.setHeader('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE, OPTIONS');
	res.writeHeader(200, {
		'Content-Type' : 'application/json'
	})
	if(req.url === '/') {
		// res.end(JSON.stringify(datas))
	}
})

server.listen(3001, () => {
	console.log("server is running")
})